week=['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
while True:
    try:
        num = int(input())
        if 0 <= num <=6:
            print(week[num])
            break
    except:
        print('输入不合法，请重新输入')